-
Notifications
You must be signed in to change notification settings - Fork 167
Add meson build system #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mochaaP
commented
Sep 10, 2025
- Add meson build system
- Sync cmake's installation layout to Makefile and Meson builds
CMakeLists.txt
Outdated
) | ||
install (FILES pystring.h | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean it will no longer install in a pystring subdirectory? So software that had been doing
#include <pystring/pystring.h>
will stop working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the conversions in:
#49
I think we do want to keep installing the header file to the /${PROJECT_NAME} sub directory.
That is the practice in different open source projects that we maintain, so wanting to keep it consistent.
Is there something stopping meson from doing that so that meson and cmake match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack. will adjust meson & makefile to that convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also should we keep -I<prefix>/include/pystring
in pkg-config so #include <pystring.h>
still works if one uses pkg-config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about pkg-config. Are we supposed to provide a .pc file for that?
But with the adjustment to the /${PROJECT_NAME} sub directory this looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done making it use the <pystring/pystring.h>
form.
I would strongly recommend that this only be accepted if it also contains modifications that add cases to the CI test matrix that build pystring with meson and also run the tests. Without an automated test to ensure that the meson build always works, I think it's a pile of divergence-caused build bugs just waiting to happen. |
(If I'm being honest, I would also recommend that the .cpp be eliminated and make the entire pystring be a single file header-only library, and then you don't really need much of a "build system" at all.) |
sure, working on ci. |
9828288
to
ede9e51
Compare
this pulls in an extra dependency on the cmake binary, CMake users can use the PkgConfig module instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. let's run with this and see how it goes.